- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
          Include rustc version in rustc_span::StableCrateId
          #89836
        
          New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| r? @nagisa (rust-highfive has picked a reviewer for you, use r? to override) | 
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
c77eab8    to
    9c53bd2      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
53ddf65    to
    a9601c8      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
28706c1    to
    616518f      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
1d10a2b    to
    deeab71      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
0d810e2    to
    e8e6c99      
    Compare
  
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are still a number of tests that seem like they would need some normalization to not require updating every time trains roll over?
        
          
                compiler/rustc_span/src/def_id.rs
              
                Outdated
          
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preexisting, but I feel like this logic is better placed in argument parsing, so that this is applied everywhere and consistently. As it is right now, it is very plausible that other places in the code won't dedup and consider -Cmetadata=a distinct from -Cmetadata=a -Cmetadata=a.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is the only code reading -Cmetadata. I would rather prefer to keep all logic for computing the stable crate id together like it is now.
        
          
                src/test/mir-opt/retag.main.SimplifyCfg-elaborate-drops.after.mir
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/test/mir-opt/retag.array_casts.SimplifyCfg-elaborate-drops.after.mir
              
                Outdated
          
            Show resolved
            Hide resolved
        
      | 💔 Test failed - checks-actions | 
| Grrr! 🤯 #89836 (comment):  | 
| Guess we need to keep some normalization the panic-short-backtrace-windows-x86_64.rs test? | 
| It's the same target  | 
3b2e3bc    to
    535278a      
    Compare
  
    | Done. 👍 | 
| @bors r+ | 
| 📌 Commit 535278a has been approved by  | 
| ☀️ Test successful - checks-actions | 
| Finished benchmarking commit (9e1aff8): comparison url. Summary: This change led to very large relevant mixed results 🤷 in compiler performance. 
 If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with  @rustbot label: +perf-regression | 
Since rust-lang/rust#89836, rustc stable crate IDs include a hash of the rustc version (including the git commit it's built from), which means that hashmaps or other structures have different behavior when comparing different rustc builds. This is bad for rustc-perf, as it means that comparing two commits has a source of noise that makes it harder to know what the actual change between two artifacts is.
Since rust-lang/rust#89836, rustc stable crate IDs include a hash of the rustc version (including the git commit it's built from), which means that hashmaps or other structures have different behavior when comparing different rustc builds. This is bad for rustc-perf, as it means that comparing two commits has a source of noise that makes it harder to know what the actual change between two artifacts is.
Since rust-lang/rust#89836, rustc stable crate IDs include a hash of the rustc version (including the git commit it's built from), which means that hashmaps or other structures have different behavior when comparing different rustc builds. This is bad for rustc-perf, as it means that comparing two commits has a source of noise that makes it harder to know what the actual change between two artifacts is.
rustc_span::def_id::StableCrateIdis a hash of various data about a crate during compilation. This PR includes the version ofrustcin the input when computing this hash. From a cursory reading of RFC 2603, this appears to be acceptable within that design.In order to pass the
mir-optanduitest suites, this adds new normalization for hashes and symbol names incompiletest. These are enabled by default, but we might prefer it to be configurable.In the UI tests, I had to truncate a significant amount of error annotations in v0 symbols (and maybe some legacy) in order to get the normalization to work correctly. (See #90116.)
Closes #85142.